class_name CharacterTestUI
extends TextEdit


var stateValMap = {
	0: "Idel",
	1: "Run",
	2: "Jump",
	3: "Fall",
	4: "Combo",
	5: "PostRock",
	6: "Unkonw"
}


@export var character_ctrl: CharacterController = null

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	if character_ctrl:
		# print("CharacterTestUI - 角色控制器初始化完毕")
		pass


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	if character_ctrl.stateMachine.curState:
		var curState = stateValMap[character_ctrl.stateMachine.curState.get_type()]
		text = curState
